import { createRouter, createWebHashHistory } from "vue-router";
const routes = [
  {
    path: "/",
    redirect: "/home",
  },
  {
    name: "home",
    path: "/home",
    component: () => import("../views/home/home.vue"),
  },
  {
    name: "login",
    path: "/login",
    component: () => import("../views/login/login.vue"),
  },
  {
    name: "detail",
    path: "/detail",
    component: () => import("../views/detail/detail.vue"),
  },
  {
    name: "msg",
    path: "/msg",
    component: () => import("../views/msg/msg.vue"),
  },
  {
    name: "order",
    path: "/order",
    component: () => import("../views/order/order.vue"),
  },
  {
    name: "orderDetail",
    path: "/orderDetail",
    component: () => import("../views/order/orderDetail/orderDetail.vue"),
  },
  {
    name: "user",
    path: "/user",
    component: () => import("../views/user/user.vue"),
  },
  {
    name: "carList",
    path: "/carList",
    component: () => import("../views/user/carList/carList.vue"),
  },
  {
    name: "money",
    path: "/money",
    component: () => import("../views/user/money/money.vue"),
  },
  {
    name: "record",
    path: "/record",
    component: () => import("../views/user/record/record.vue"),
  },
  {
    name: "addCar",
    path: "/addCar",
    component: () => import("../views/user/addCar/addCar.vue"),
  },
];
const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;
